package com.blog.controller.adminarticle;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.blog.controller.base.BaseServlet;
import com.blog.entity.AdminArticleDetailEntity;
import com.blog.entity.AdminArticleEntity;
import com.blog.entity.AdminArticleQueryEntity;
import com.blog.service.adminadminarticle.AdminArticleService;
import com.blog.utils.PageBean;

@WebServlet("/adminArticalDetail")
public class AdminArticleDetail extends BaseServlet {

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
	 	int blogid=Integer.parseInt(req.getParameter("blogid"));
		AdminArticleService service=AdminArticleService.getInstance();
		AdminArticleDetailEntity article=service.getArticleContent(blogid);
		req.setAttribute("article",article );
		forward("admin/adminarticledetail");
	}
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
}
